/**
 * Simulation implementation
 */

#include "Simulation.h"

/////////////////////////////////////////////////

void Simulation::step(unsigned int delta)
{
}

/////////////////////////////////////////////////

void Simulation::handleKeyPress(SDL_keysym* keysym)
{
	if (keysym->sym == SDLK_ESCAPE) {
		_finished = true;
	} 
	
}

/////////////////////////////////////////////////

void Simulation::handleKeyRelease(SDL_keysym* keysym)
{
	assert(_engine != 0);
#if 0
	if (keysym->sym == SDLK_LEFT) {
		// Decrease number of sec lights
		if (_engine->getNumSecLights() > 0) {
			_engine->setNumSecLights(_engine->getNumSecLights() - 1);
		}
		std::cerr << "Sec. lights : " << _engine->getNumSecLights() << std::endl;
	} else if (keysym->sym == SDLK_RIGHT) {
		// Increase number of lights
		_engine->setNumSecLights(_engine->getNumSecLights() + 1);
		std::cerr << "Sec. lights : " << _engine->getNumSecLights() << std::endl;
	}
#endif

	if (keysym->sym == SDLK_SPACE) {
		_engine->toggleRadiosity();
	} else if (keysym->sym == SDLK_l) {
		_engine->toggleShowFromLight();
	}
}

/////////////////////////////////////////////////

void Simulation::handleMouseMotion(SDL_MouseMotionEvent* keysym)
{
}

